﻿<UserControl x:Class="MoPlus.SolutionBuilder.WpfClient.UserControls.Output"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
			 xmlns:vm="clr-namespace:MoPlus.ViewModel;assembly=MoPlus.ViewModel"
             xmlns:lib="clr-namespace:MoPlus.SolutionBuilder.WpfClient.Library"
             xmlns:Settings="clr-namespace:MoPlus.SolutionBuilder.WpfClient.Library;assembly=MoPlus.SolutionBuilder.WpfClient"
             mc:Ignorable="d" 
             d:DesignHeight="100" d:DesignWidth="300">
	<UserControl.InputBindings>
		<KeyBinding Modifiers="Ctrl" Key="Q" Command="{Binding CancelJobsCommand}" />
	</UserControl.InputBindings>
	<UserControl.CommandBindings>
		<CommandBinding Command="vm:CustomCommands.ClearText" CanExecute="ClearTextCanExecute" Executed="ClearTextExecuted"></CommandBinding>
	</UserControl.CommandBindings>
	<UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="../Resources/Theme.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </UserControl.Resources>
	<Grid RenderTransformOrigin="0.5,0.5">
		<Grid.LayoutTransform>
			<TransformGroup>
				<ScaleTransform ScaleX="{Binding Source={x:Static Settings:UserSettingsHelper.Instance}, Path=ControlSize, Mode=TwoWay}"
					                            ScaleY="{Binding Source={x:Static Settings:UserSettingsHelper.Instance}, Path=ControlSize, Mode=TwoWay}"/>
			</TransformGroup>
		</Grid.LayoutTransform>
		<Grid.ContextMenu>
			<ContextMenu>
				<MenuItem Header="{Binding MenuLabelClearText}" Command="vm:CustomCommands.ClearText"></MenuItem>
			</ContextMenu>
		</Grid.ContextMenu>
		<TextBox Name="txtOutput" HorizontalScrollBarVisibility="Auto" IsReadOnly="True" VerticalScrollBarVisibility="Visible" TextWrapping="Wrap" />
    </Grid>
</UserControl>
